package com.zhuss.controller.repair;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.zhuss.bean.bo.food.order.CancelOrderBo;
import com.zhuss.bean.bo.food.order.wechat.CreateBoxOrderBo;
import com.zhuss.bean.bo.food.order.wechat.CreateStirfryOrderBo;
import com.zhuss.bean.bo.food.order.wechat.CreateTakeoutOrderBo;
import com.zhuss.bean.bo.food.order.wechat.CreateTopicBo;
import com.zhuss.bean.bo.repair.repair.BackRepairBo;
import com.zhuss.bean.bo.repair.repair.CreateRepairBo;
import com.zhuss.bean.bo.repair.repair.DeleteRepairBo;
import com.zhuss.common.BaseController;
import com.zhuss.common.OperateService;
import com.zhuss.common.OrderService;
import com.zhuss.exception.WpsException;
import com.zhuss.food.order.OrderOperateServiceExt;
import com.zhuss.food.order.OrderOperateServiceWechat;
import com.zhuss.repair.repair.RepairOperateServiceExt;


/**
 * 小程序报修添加
 *
 */
  
 
@RestController
@RequestMapping("/repair")
public class RepairOperateController extends BaseController {
	
	@Autowired
	@Qualifier("repairOperateServiceWechat")
	private OperateService<Void, Object> repairOperateServiceWechat;
	
	@Autowired
	@Qualifier("repairOperateServiceExt")
	private RepairOperateServiceExt repairOperateServiceExt;
	
	/**
	 * 创建
	 * @param bo
	 * @throws WpsException
	 */
	@ResponseBody
    @PostMapping("/create")
    public void create(@RequestBody CreateRepairBo bo) throws WpsException {
		
		repairOperateServiceWechat.create(bo);
    }
	
	/**
	 * 删除
	 * @param bo
	 * @throws WpsException
	 */
	@ResponseBody
    @PostMapping("/delete")
    public void delete(@RequestBody DeleteRepairBo bo) throws WpsException {
		
		repairOperateServiceWechat.delete(bo);
    }

	/**
	 * 撤回
	 * @param bo
	 * @throws WpsException
	 */
	@ResponseBody
    @PostMapping("/back")
    public void back(@RequestBody BackRepairBo bo) throws WpsException {
		
		repairOperateServiceExt.back(bo);
    }

	
}
